import { reactive } from "vue";

export default function useData() {
  const pageData = reactive({
    columnData: [
      {
        label: "序号",
        prop: "0",
        width: "80px",
        sortable: true
      },
      {
        label: "用户",
        prop: "1",
        width: "auto"
      },
      {
        label: "角色",
        prop: "2",
        width: "auto"
      },
      {
        label: "IP",
        prop: "3",
        width: "auto"
      },
      {
        label: "功能模块",
        prop: "4",
        width: "auto"
      },
      {
        label: "操作",
        prop: "5",
        width: "auto"
      },
      {
        label: "详情",
        prop: "6",
        width: "auto"
      },
      {
        label: "操作时间",
        prop: "7",
        width: "auto"
      }
    ]
  });
  const roleMap = new Map([
    ["系统管理员", "1"],
    ["安全管理员", "2"],
    ["审计管理员", "3"]
  ]);
  return {
    pageData,
    roleMap
  };
}
